// Original source and concept by Hextator
// Rewritten by Nintenlord

arch gba.thumb

org $08012c6c
	ldr r1, [pc, #8]
	add r0, r5, #0
	bl $08012C9C
	str r5, [r6, #0]
	b $08012c92
	
dd $0202a5b4
//08012c7c-8e are free: 12 opcodes

org $08004364
textLoader:
	push {lr}
	lsr r2, r0, #31
	cmp r2, #0
	beq textLoader.compressed
	
.uncompressed:
	bl $08012c7c
	b textLoader.end
	
.compressed:
	ldr r2, [pc, #8]
	ldr r2, [r2, #0]
	bl $080bfc54

.end:
	pop {pc}

dd $03003940

org $08012c7c

main: 
	mov r3, #0x80
	lsl r3, r3, #24
	sub r0, r0, r3
	
.loop:
	ldrb r2, [r0, #0]
	strb r2, [r1, #0]
	add r1, #1
	add r0, #1
	cmp r2, #0
	bne main.loop

.Cend:
	bx lr
